import extraConfigEvent from '@/common/extra-config-event.js';
import { EMIT_PARAMS_OBJ } from '@/utils/constant';
import { $demoi18n } from '@/utils/lang';
import { xvueTheme } from '@/utils/util';
const config = {
  isCustomProertyPannel: true,
  propertyPannelName: `config_${process.env.xvueNameSpace_}multi_value`,
  config: {
    property: {
      propertyGroup: 'multiSingleIcon',
      title: '',
      isTitleSignVisiable: false,
      signMarginLeft: 10,
      verticalLineBackgroundColor: '#00ffff',
      multiSortBy: 'name',
      linkType: 'link',
      jumpUrl: '',
      siteId: '',
      directoryId: '',
      pageId: '',
      isOpenNewPage: true,
      selectedStatusSetting: {
        show: false,
        fillColor: '#eff5fc',
        border: 'no',
        borderColor: '#eff5fc',
        borderSize: 1,
        defaultSelected: false,
      },
      splitLineSetting: {
        show: false,
        color: '#cbd0d6',
        size: 1,
      },
      valueAdded: {
        isThreshold: false,
        threshold: [
          {
            min: 0,
            max: 0,
            text: '',
            color: '',
            icon: '',
            iconSmall: '',
            uploadList: '',
            imgUrl: '',
          },
        ],
        thresholdDataType: 'number',
      }, // 附加值
      backgroundColor: '',
      textAreaWidth: 60,
      typeSetting: {
        showIcon: 'withIcon',
        gridCount: {
          Z: 2,
          N: 2,
        },
        sortType: 'Z',
        widthStyle: 'auto_width', // auto_width: 子元素宽度不定 | equal_width: 子元素宽度相等
        alineStyle: 'row',
        componentType: 0,
        textWidth: 120,
        valueWidth: 120,
        extraWidth: 120,
        nameStyle: {},
        valueStyle: {},
        extraStyle: {},
        iconStyle: {},
      },
      adaptSetting: {
        unitGapRate: 5,
        type: '0',
        tableData: [],
        lineGap: 3,
        columnAdjustWidth: 100,
        rowAdjustHeight: 20,
        paddingLeft: 0,
        paddingRight: 0,
      },
      alineStyle: 'row',
      isDynamicAdapt: false,
      nullSet: '',
      data: [
        {
          name: 'series 1',
          alias: '',
          unit: '',
          icon: '',
          iconSmall: '',
          uploadList: [],
          imgUrl: '',
          extra: '',
          isAbsoluteValue: false,
        },
      ],
      isThreshold: false,
      threshold: [
        {
          min: 0,
          max: 0,
          text: '',
          color: '',
          icon: '',
          iconSmall: '',
          uploadList: '',
          imgUrl: '',
        },
      ],
      thresholdDataType: 'number',
      componentStyle: xvueTheme,
      fontColor: '#ff9519',
      fontSizeName: 14,
      fontSizeValue: 14,
      fontSizeUnit: 14,
      imgSize: 60,
      uploadImgList: [],
      tooltip: {
        isVisiable: true,
        html: '',
        apis: [],
      },
      isGradient: false,
      gradientDirection: 'vertical',
      contentBackgroundColor: 'rgba(255,255,255,0)',
      contentGradientColor: 'gradient1',
      noDataPromptType: 'defaultPrompt',
      noDataPrompt: '',
    },
    data: {
      dataSourceType: 'staticData',
      dataSource: '',
      apiCode: '',
      dataPackage: '',
      dataTable: '',
      redisKey: '',
      autoRefresh: {
        switchEnable: false,
        actTypes: ['pull', 'push'],
        actType: 'pull',
        interval: 300,
        frequencyType: '',
      },
      tableData: [
        {
          field: 's',
          mapping: 'series',
          explain: 'panelData.explain.category',
        },
        {
          field: 'y',
          mapping: 'profit',
          skipVerification: true,
          explain: 'panelData.explain.value',
        },
        {
          field: 'unit',
          mapping: '',
          skipVerification: true,
          explain: 'panel.label.unit',
        },
        {
          field: 'y1',
          skipVerification: true,
          notShowDelete: true,
          mapping: 'profitRate',
          explain: 'panel.explain.valueAddedOptional',
        },
      ],
    },
  },
  events: [
    {
      id: 'c85c5869-7162-4346-9b7a-1b7f04c8523r',
      key: 'item-click',
      label: '数值点击事件',
      type: 'out',
      extraTpye: 'fieldName',
      description: '',
      paramKey: 'profit',
      parameters: [
        {
          id: '',
          key: 'item_click_key',
          label: 'panelEvent.label.eventKey',
          value: '',
        },
        {
          id: '',
          key: EMIT_PARAMS_OBJ,
          label: '发出参数对象',
          hide: true,
          value: '',
        },
      ],
    },
    {
      id: 'c85c8741-7162-4346-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'efba3598-6e9a-4882-b77b-782wsdfac7db',
          key: 'key-old-1',
          label: 'key',
          value: '',
        },
      ],
    },
    {
      id: 'c85c5869-7162-8566-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-2589-b77b-782wsdfac7db',
          key: 'key-old-2',
          label: '时间',
          value: '',
        },
      ],
    },
    {
      id: '0000001-7162-bnmj-9b7a-1b7f04c85999',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa3598-6e9a-grvs-b77b-782tgbfac999',
          key: 'key-1',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000002-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '8f42b8f0-d315-11ea-988b-c71201010d36',
          key: 'key-2',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000003-d315-11ea-988b-c71201010d36',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4cf9440-d315-11ea-bf46-2557ecf0db55',
          key: 'key-3',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000004-d315-11ea-bf46-2557ecf0db55',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: 'f4d141f1-d315-11ea-bf46-2557ecf0db55',
          key: 'key-4',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000005-1000-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1000-4882-b77b-782wsdfac7db',
          key: 'key-5',
          label: '',
          value: '',
        },
      ],
    },

    {
      id: '0000006-1010-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1010-4882-b77b-782wsdfac7db',
          key: 'key-6',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000007-1002-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1002-4882-b77b-782wsdfac7db',
          key: 'key-7',
          label: '',
          value: '',
        },
      ],
    },
    {
      id: '0000008-1003-rgbn-9b7a-1b7f04c8523c',
      key: '',
      label: '',
      type: 'in',
      description: '',
      parameters: [
        {
          id: '1eaa1000-1003-4882-b77b-782wsdfac7db',
          key: 'key-8',
          label: '',
          value: '',
        },
      ],
    },
    ...extraConfigEvent,
  ],
};

export default config;
